import request from '@/utils/request'

// 查询订单管理列表
export function listOrder(query) {
  return request({
    url: '/order/order/list',
    method: 'get',
    params: query
  })
}
export function getOrderList() {
  return request({
    url: '/order/order/getOrderList',
    method: 'get',
  })
}
//折线图
export function showmonchan() {
  return request({
    url: '/order/order/showmonchan',
    method: 'get',
  })
}


export function listcheckOrder(query) {
  return request({
    url: '/order/order/checklist/'+query.skuname+"/"+query.warehousename,
    method: 'get',

  })
}
// 查询订单管理详细
export function getOrder(id) {
  return request({
    url: '/order/order/' + id,
    method: 'get'
  })
}

// 新增订单管理
export function addOrder(data) {
  return request({
    url: '/order/order',
    method: 'post',
    data: data
  })
}

// 修改订单管理
export function updateOrder(data) {
  return request({
    url: '/order/order',
    method: 'put',
    data: data
  })
}

// 删除订单管理
export function delOrder(id) {
  return request({
    url: '/order/order/' + id,
    method: 'delete'
  })
}
// 初始化仓库下拉列表
export function getwarehouselist() {
  return request({
    url: '/order/order/getwarehouselist',
    method: 'get',
  })
}

// 初始化商品下拉列表
export function getskulist() {
  return request({
    url: '/order/order/getskulist',
    method: 'get',
  })
}
